package com.cmc.cloud.cmclink.doc.api.document.req.so.sovo.sovo;

import com.cmc.cloud.cmclink.doc.api.document.req.so.sovo.sovslvoyvo.SoVslvoyRespVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订舱主Response VO
 *
 * @author codegen
 */
@Schema(description = "管理后台 - 订舱主 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class SoRespVO extends SoBaseVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27247")
    private Long id;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "货物-货类-多个聚合")
    private String cargoTypeSum;
    @Schema(description = "货物-毛重-多个聚合 预估毛重（kgs）")
    private BigDecimal grossWeightSum;

    @Schema(description = "预配-多个聚合 1*20GP;2*40HC 箱量*箱尺寸+箱型")
    private String forecastDesc;

    @Schema(description = "附件数量")
    private Integer attachmentCount;

    @Schema(description = "航次 -POL ETD 预计离港时间 ")
    private String polEtd;

    @Schema(description = "POD ETA 预计到达时间")
    private String podEta;

    @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
    private String creator;

    @Schema(description = "第一个 liner ChangeBKGVessel]", requiredMode = Schema.RequiredMode.REQUIRED)
    SoVslvoyRespVO soVslvoyFirstLiner;
    @Schema(description = "订舱航次路径List", requiredMode = Schema.RequiredMode.REQUIRED)
    List<SoVslvoyRespVO> soVslvoyList;
    @Schema(description = "申请记录状态")
    private String soAmendStatus;
    @Schema(description = "申请记录ID")
    private Long soAmendId;
    @Schema(description = "申请记录状态")
    private String soAmendApplyReason;
    @Schema(description = "第二个linerPod 打印使用")
    private String secondTsPort;

    @Schema(description = "数据对比结果")
    Boolean compareResult;

    @Schema(description = "数据对比结果FirstVslvoy")
    Boolean compareFirstVslvoyResult;

    @Schema(description = "操作类型【数据字典COMBINE、SPLIT、COD】")
    private String operatianType;

    @Schema(description = "订舱人代码-客商企业英文名称")
    String bookingPartyEn;

    public Boolean getCompareResult() {
        if (compareResult == null) {
            return false;
        }
        return compareResult;
    }

    public Boolean getCompareFirstVslvoyResult() {
        if (compareFirstVslvoyResult == null) {
            return false;
        }
        return compareFirstVslvoyResult;
    }

    public Integer getAttachmentCount() {
        if (attachmentCount == null) {
            return 0;
        }
        return attachmentCount;
    }
}
